#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void Func(int arr[], int len)
{
	int i = 0;
	int j = len - 1;
	while (i < j)
	{
		while (i < j && arr[i] % 2 != 0)
		{
			i++;
		}
		while (i < j && arr[j] % 2 == 0)
		{
			j--;
		}
		int tmp = arr[i];
		arr[i] = arr[j];
		arr[j] = tmp;
	}
}
void Show(int arr[], int len)
{
	for (int i = 0; i < len; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
}
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9 };
	int len = sizeof(arr) / sizeof(arr[0]);
	Func(arr, len);
	Show(arr, len);
	return 0;
}